package cn.com.inossem.utils;

import java.util.Comparator;

import cn.com.inossem.model.UserInfo;

/**
 * ƴ���Ƚ���
 * 
 * @author ����
 * 
 */
public class PinyinComparator implements Comparator<Object> {

	public int compare(Object arg0, Object arg1) {
		UserInfo user0 = (UserInfo) arg0;
		UserInfo user1 = (UserInfo) arg1;

		String str1 = PingYinUtil.getPingYin(((String) user0.getTruename())
				.toLowerCase());
		String str2 = PingYinUtil.getPingYin(((String) user1.getTruename())
				.toLowerCase());
		return str1.compareTo(str2);
	}
}